namespace Jumpton.SFA.Entity {
    using System;
    using System.Collections.Generic;
    using System.Text;  
    using System.Data;
    using System.Runtime.Serialization;
    using Jumpton.Persistent;
    
    [System.SerializableAttribute()]
    [Map("PHOTO")]
    public class PHOTO : ObjectRow {
        
        public PHOTO() {
        }
        
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="dataRow">DataTable 中的一行数据</param>
        /// <param name="objectTable">存储当前对象的数据表格</param>
        public PHOTO(System.Data.DataRow dataRow, ObjectTable parent) : 
                base(dataRow, parent) {
        }
        
        /// <summary>
        /// 供反序列化使用的构造函数
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected PHOTO(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                base(info, context) {
        }
        
        [Key("ID",true,true)]
        public decimal ID {
            get {
                return (System.Decimal)GetValue("ID");
            }
            set {
                SetValue("ID", value);
            }
        }
        
        [Field("USER_ID")]
        public decimal USERID {
            get {
                return (System.Decimal)GetValue("USERID");
            }
            set {
                SetValue("USERID", value);
            }
        }
        
        [Field("VISIT_ID")]
        public decimal VISITID {
            get {
                return (System.Decimal)GetValue("VISITID");
            }
            set {
                SetValue("VISITID", value);
            }
        }
        
        [Field("PHOTO_TYPE_ID")]
        public decimal PHOTOTYPEID {
            get {
                return (System.Decimal)GetValue("PHOTOTYPEID");
            }
            set {
                SetValue("PHOTOTYPEID", value);
            }
        }
        
        [Field("PHOTO_MEMO")]
        public string PHOTOMEMO {
            get {
                return (System.String)GetValue("PHOTOMEMO");
            }
            set {
                SetValue("PHOTOMEMO", value);
            }
        }

        [Field("PHOTO_PATH")]
        public string PHOTOPATH
        {
            get
            {
                return (System.String)GetValue("PHOTOPATH");
            }
            set
            {
                SetValue("PHOTOPATH", value);
            }
        }

        //[Field("PHOTO_CONTENT")]
        //public byte[] PHOTOCONTENT
        //{
        //    get
        //    {
        //        return (byte[])GetValue("PHOTOCONTENT");
        //    }
        //    set
        //    {
        //        SetValue("PHOTOCONTENT", value);
        //    }
        //}
        
        [Field("PHOTO_DATE")]
        public decimal PHOTODATE {
            get {
                return (System.Decimal)GetValue("PHOTODATE");
            }
            set {
                SetValue("PHOTODATE", value);
            }
        }
        
        
        
       
        
        [Field("DESCRIPTION")]
        public string DESCRIPTION {
            get {
                return (System.String)GetValue("DESCRIPTION");
            }
            set {
                SetValue("DESCRIPTION", value);
            }
        }

        [Field("ACTIVE")]
        public Boolean ACTIVE {
            get {
                return (System.Boolean)GetValue("ACTIVE");
            }
            set {
                SetValue("ACTIVE", value);
            }
        }
        
        [Field("DOMAIN_ID")]
        public decimal DOMAINID {
            get {
                return (System.Decimal)GetValue("DOMAINID");
            }
            set {
                SetValue("DOMAINID", value);
            }
        }
        
        [Field("LAST_UPDATER")]
        public string LAST_UPDATER
        {
            get {
                return (System.String)GetValue("LAST_UPDATER");
            }
            set {
                SetValue("LAST_UPDATER", value);
            }
        }
        
        [Field("lAST_UPDATE_TIME")]
        public decimal LAST_UPDATE_TIME {
            get {
                return (System.Decimal)GetValue("LAST_UPDATE_TIME");
            }
            set {
                SetValue("LAST_UPDATE_TIME", value);
            }
        }

        public enum EPhotoType
        {
            无GPS拍照 = 1,
            GPS偏差过大拍照 = 2
        }
    }
}
